home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / utils / text / showtext.06 / showtext / showtext-0.06 / show.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-09-18  |  6.9 KB  |  188 lines

  1. /*
  2.  
  3.     Copyright (C) 1995  Rolf Jakob <rjakob@duffy1.franken.de>
  4.  
  5.     This program is free software; you can redistribute it and/or modify
  6.     it under the terms of the GNU General Public License as published by
  7.     the Free Software Foundation; either version 2 of the License, or
  8.     (at your option) any later version.
  9.  
  10.     This program is distributed in the hope that it will be useful,
  11.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.     GNU General Public License for more details.
  14.  
  15.     You should have received a copy of the GNU General Public License
  16.     along with this program; if not, write to the Free Software
  17.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. */
  19.  
  20.  
  21. struct c_tokens_str {
  22.     char token[16];
  23.     int number;
  24.     };
  25.  
  26. #define C_CLS        1
  27. #define C_TERM        2
  28. #define C_REFRESH    3
  29. #define C_WAIT        4
  30. #define C_NOTERM    5
  31. #define C_EXIT        6
  32. #define C_GO_X        10
  33. #define C_GO_Y        11
  34. #define C_C_EOL        12
  35. #define C_C_BOT        13
  36. #define C_GOTO        14
  37. #define C_BOLD        28
  38. #define C_NOBOLD    29
  39. #define C_BLINK        30
  40. #define C_NOBLINK        31
  41. #define C_COLOROFF    32
  42. #define C_NORMAL    32
  43. #define C_FIRSTCOLOR    33
  44. #define C_BLACK        33
  45. #define C_RED        34
  46. #define C_GREEN        35
  47. #define C_BROWN        36
  48. #define C_BLUE        37
  49. #define C_MAGENTA    38
  50. #define C_CYAN        39
  51. #define C_LGRAY        40
  52. #define C_DGRAY        41
  53. #define C_LRED        42
  54. #define C_LGREEN    43
  55. #define C_YELLOW    44
  56. #define C_LBLUE        45
  57. #define C_LMAGENTA    46
  58. #define C_LCYAN        47
  59. #define C_WHITE    48
  60. #define C_LASTCOLOR    48
  61. #define C_BACKGROUND    49
  62. #define C_INVERS    50
  63. #define C_NOINVERS    51
  64. #define C_ENV    64
  65. #define C_LOGIN    65
  66. #define C_SYSTEM    66
  67. #define C_PIPE    67
  68. #define C_PPIPE    68
  69. #define C_OPIPE    69
  70. #define C_GETKEY 70
  71. #define C_OKEY    71
  72. #define C_GETSTR 72
  73. #define C_OSTR    73
  74. #define C_EXEC    74
  75. #define C_SET    75
  76. #define C_UNSET    76
  77. #define C_OSTRC    77
  78. #define C_OSTRI    78
  79. #define C_OPEN    80
  80. #define C_CLOSE    81
  81. #define C_REDIR    82
  82. #define C_UNREDIR    83
  83. #define C_IFEX        84
  84. #define C_IFTERM    85
  85. #define C_IOPEN        86
  86. #define C_ICLOSE    87
  87. #define C_IGETSTR    88
  88. #define C_APPEND    89
  89. #define C_IFEMPTY    90
  90. #define C_IFNEMPTY    91
  91. #define C_IFZERO    92
  92. #define C_IFNZERO    93
  93. #define C_IREWIND    94
  94. #define C_IFEQ        95
  95. #define C_IFNEQ        96
  96. #define C_IFGT        97
  97. #define C_IFNGT        98
  98. #define C_TRUNCR    99
  99. #define C_TRUNCL    100
  100. #define C_ADVANCE    101
  101. #define C_PAUSE        102
  102. #define C_INCLUDE    103
  103. #define C_SPAWN        104
  104.  
  105. struct c_tokens_str c_tokens[]={
  106. "CLS",C_CLS,        /* clear screen */
  107. "TERM",C_TERM,        /* switch to "curses" mode */
  108. "R",C_REFRESH,        /* refresh screen (a must in "curses" mode */
  109. "REFRESH",C_REFRESH,    /* same as R */
  110. "exit",C_EXIT,        /* quit showtext */
  111. "warte",C_WAIT,        /* same as wait */
  112. "wait",C_WAIT,        /* [wait text] wait for a return and optionally print text */
  113. "NOTERM",C_NOTERM,    /* switch to normal terminal mode */
  114. "go_x",C_GO_X,        /* [go_x x] goto hor. position x (only in TERM mode) */
  115. "go_y",C_GO_Y,        /* [go_y y] goto vert. position y (only in TERM mode) */
  116. "c_eol",C_C_EOL,    /* clear to end of line */
  117. "c_bot",C_C_BOT,    /* clear to bottom of screen */
  118. "goto",C_GOTO,        /* [goto label] jump to label */
  119. "blink",C_BLINK,    /* set blink attribute */
  120. "noblink",C_NOBLINK,    /* unset blink attribute */
  121. "bold",C_BOLD,        /* set bold attribute */
  122. "nobold",C_NOBOLD,    /* unset bold attribute */
  123. "normal",C_COLOROFF,    /* switch off attributes - normal color */
  124. "black",C_BLACK,    /* set foreground (fg) color to black */
  125. "red",C_RED,        /* fg red */
  126. "green",C_GREEN,    /* fg green */
  127. "brown",C_BROWN,    /* fg brown */
  128. "blue",C_BLUE,        /* fg blue */
  129. "magenta",C_MAGENTA,    /* fg magenta */
  130. "cyan",C_CYAN,        /* fg cyan */
  131. "lgray",C_LGRAY,    /* fg light gray */
  132. "gray",C_LGRAY,        /* same as lgray */
  133. "dgray",C_DGRAY,    /* fg dark gray "light black" */
  134. "lred",C_LRED,        /* fg light red */
  135. "lgreen",C_LGREEN,    /* fg light green */
  136. "yellow",C_YELLOW,    /* fg yellow "light brown" */
  137. "lblue",C_LBLUE,    /* fg light blue */
  138. "lmagenta",C_LMAGENTA,    /* fg light magenta */
  139. "lcyan",C_LCYAN,    /* fg light cyan */
  140. "white",C_WHITE,    /* fg white */
  141. "bg",C_BACKGROUND,    /* [bg color] set background to color (see fg ..) */
  142. "invers",C_INVERS,    /* set REVERSE attribute (kills color !) */
  143. "reverse",C_INVERS,    /* same as invers */
  144. "noinvers",C_NOINVERS,    /* unset REVERSE attribute */
  145. "noreverse",C_NOINVERS,    /* same as noinvers */
  146. "login",C_LOGIN,    /* prints out login name */
  147. "env",C_ENV,    /* [env var] gets environment var and prints it */
  148. "system",C_SYSTEM,    /* [system command] executes command */
  149. "exec",C_EXEC,    /* [exec command] executes command (no return !) */
  150. "spawn",C_SPAWN,    /* [spawn command] executes command in another process */
  151. "pipe",C_PIPE,    /* [pipe command] executes command and stores output */
  152. "ppipe",C_PPIPE,    /* [pipe command] same as pipe but prints output immediatly */
  153. "opipe",C_OPIPE,    /* prints output from previous pipe command */
  154. "getkey",C_GETKEY,    /* [getkey charlist] gets characters until it's in charlist */
  155. "okey",C_OKEY,    /* prints character from previous getkey command */
  156. "getstr",C_GETSTR,    /* [getstr length name] gets string into var name max. length length */
  157. "igetstr",C_IGETSTR,    /* [igetstr name] gets string into var name */
  158. "ostr",C_OSTR,    /* [ostr var] prints var */
  159. "ostrc",C_OSTRC,    /* similar to ostr but centers output in term mode */
  160. "ostri",C_OSTRI,    /* interprets arg (var substitution) and outputs the result */
  161. "open",C_OPEN,    /* [open name] opens file name for output (clears existing file) */
  162. "append",C_APPEND,    /* [append name] opens file name for appending */
  163. "iopen",C_IOPEN,    /* [iopen name] opens file name for input */
  164. "close",C_CLOSE,    /* closes file from previous open/append */
  165. "iclose",C_ICLOSE,    /* closes file from previous iopen */
  166. "irewind",C_IREWIND,    /* positions filepointer of input file to beginning */
  167. "redir",C_REDIR,    /* redirect to file from previous open/append */
  168. "unredir",C_UNREDIR,    /* redirect back to stdout */
  169. "set",C_SET,    /* [set var value] set variable var to value (interprets $name) */
  170. "unset",C_UNSET,    /* [unset var] unset variable */
  171. "truncr",C_TRUNCR,    /* [truncr var] removes trailing spaces of value of var */
  172. "truncl",C_TRUNCL,    /* [truncl var] removes leading spaces of value of var */
  173. "advance",C_ADVANCE,    /* [advance var value] adds value to var */
  174. "ifexist",C_IFEX,    /* [ifexist file] execute remainder of line if file exists */
  175. "ifterm",C_IFTERM,    /* [ifterm type] dito if terminal type is type */
  176. "ifempty",C_IFEMPTY,    /* [ifempty var] dito if var is empty */
  177. "ifnempty",C_IFNEMPTY,    /* [ifnempty var] dito if var is not empty */
  178. "ifzero",C_IFZERO,    /* [ifzero var] dito if var is 0 */
  179. "ifnzero",C_IFNZERO,    /* [ifnzero var] dito if var is not 0 */
  180. "ifeq",C_IFEQ,    /* [ifeq var value] dito if var is value */
  181. "ifneq",C_IFNEQ,    /* [ifneq var value] dito if var is not value */
  182. "ifgt",C_IFGT,    /* [ifgt var value] dito if var is greater value (num.) */
  183. "ifngt",C_IFNGT,    /* [ifngt var value] dito if var is not greater value (num.) */
  184. "pause",C_PAUSE,    /* [pause number] executes wait if less than number lines left */
  185. "include",C_INCLUDE,    /* [include file] includes file into current source */
  186. "NOP",0};        /* only for internal use :-) */
  187.  
  188.